package gui.perspective;

import gui.view.GlobalChatView;
import gui.view.RoomView;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class ChatRoomPerspective implements IPerspectiveFactory {
	public static final String ID = "gui.perspective.ChatRoomPerspective";

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);

		//layout.addStandaloneView(ToolBarView.ID, true, IPageLayout.TOP, 0.10f,editorArea );
		
		layout.addStandaloneView(RoomView.ID, true, IPageLayout.LEFT, 0.25f,
				editorArea);
		layout.addStandaloneView(GlobalChatView.ID, true, IPageLayout.TOP,
				0.5f, editorArea);
		layout.addStandaloneView(IPageLayout.ID_PROP_SHEET, true,
				IPageLayout.BOTTOM, 0.50f, RoomView.ID);

		layout.getViewLayout(RoomView.ID).setCloseable(false);
		layout.getViewLayout(GlobalChatView.ID).setCloseable(false);
		layout.getViewLayout(IPageLayout.ID_PROP_SHEET).setCloseable(false);

		// IFolderLayout topLeft = layout.createFolder("topLeft",
		// IPageLayout.LEFT, 0.30f, editorArea);
		// topLeft.addView(RoomView.ID);
		//
		// IFolderLayout topRight = layout.createFolder("topRight",
		// IPageLayout.RIGHT, 0.70f, editorArea);
		// topRight.addView(GlobalChatView.ID);
		//
		// IFolderLayout bottomLeft = layout.createFolder("bottomLeft",
		// IPageLayout.BOTTOM, 0.50f, "topLeft");
		// bottomLeft.addView(WorldView.ID);
	}

}
